/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kotionokyurievna.gmail.com.threadjoinvolatile.threadPack;

import kotionokyurievna.gmail.com.threadjoinvolatile.logic.AddSinCalculator;

/**
 *
 * @author Kateryna_Reznik
 */
public class SimpleThread implements Runnable{
    private int number;
    private int arguments[];
    private double sum;
    private AddSinCalculator calculator;
    private ThreadScheduler ts;
    
    public SimpleThread( int args[], int num){
        int n = args.length;
        arguments = new int[n];
        System.arraycopy(args, 0, arguments, 0, n);
        calculator = new AddSinCalculator();
        number = num;
        sum = 0;
    }
    
    
    public void run() {
        sum = calculator.addSin(arguments);
    }
    
    public double getResult(){
        return sum;
    }
    
}
